package com.example.domain.convert;

import com.example.domain.entity.Role;
import com.example.domain.vo.RoleVO;

import org.mapstruct.BeanMapping;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;

import java.util.List;

@Mapper(componentModel = "spring")
public interface RoleConvert {

    Role toEntity(com.example.domain.dto.RoleDTO dto);

    RoleVO toVO(Role entity);

    List<RoleVO> toVOList(List<Role> list);

    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    void updateEntity(@MappingTarget Role entity, com.example.domain.dto.RoleDTO dto);
} 